package com.guigu.auth.controller;


import com.guigu.auth.entity.CoreStation;
import com.guigu.auth.service.CoreStationService;
import com.guigu.tms.result.R;
import com.guigu.tms.result.ResultCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 岗位 前端控制器
 * </p>
 *
 * @author TaoLong
 * @since 2021-12-06
 */
@RestController
@RequestMapping("/auth/core-station")
@Api(tags = "岗位管理")

public class CoreStationController {

    @Autowired
    private CoreStationService coreStationService;

    /**
     * 查询所有岗位
     * @return
     */
    @ApiOperation("查询所有岗位")
    @GetMapping("/queryAllCoreStation")
    public R<List<CoreStation>> queryAllCoreStation() {
        List<CoreStation> list = coreStationService.list(null);
        return new R<>(ResultCode.SUCCESS_CODE, list);
    }
}

